import Main from "./main.vue";
import Vue from "vue";
import store from "./store";

let instance;

const DrawerThemeSettings = (options?: any) => {
  if (!instance) {
    instance = new Main();
    instance.$mount();
    document.body.appendChild(instance.$el);
  }

  Vue.nextTick(() => {
    store.visible = true;
  });

  return instance;

};

DrawerThemeSettings.show = (options?: any) => DrawerThemeSettings(options);

export {DrawerThemeSettings};

export default DrawerThemeSettings;
